.z-player-danmu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;

  & * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
  }

  .z-player-danmu-item {
    position: absolute;
    box-sizing: border-box;
    padding: 0 4px;
    border-radius: .1em;
    text-shadow: 1px 0 1px #000,
      0 1px 1px #000,
      0 -1px 1px #000,
      -1px 0 1px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;

    &:hover {
      animation-play-state: paused !important;
      z-index: 1;
    }
  }

  .z-player-danmu-item_right {
    right: 0;
    transform: translateX(100%);
    -webkit-animation-name: 'danmu-right';

    &.z-player-danmu-item_move {
      will-change: transform;
      animation-name: 'danmu-right';
      animation-timing-function: linear;
    }
  }

  .z-player-danmu-item_top,
  .z-player-danmu-item_bottom {
    left: 50%;
    transform: translate(-50%, 0);
    -webkit-animation-name: 'danmu-center';

    &.z-player-danmu-item_move {
      will-change: visibility;
      animation-name: 'danmu-center';
      animation-timing-function: linear;
    }
  }

  @keyframes danmu-right {
    from {
      transform: translateX(100%);
    }
  }

  @keyframes danmu-center {
    from {
      visibility: visible;
    }
    to {
      visibility: visible;
    }
  }
}

.z-player-danmu_mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}
